package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MerchantStoreCustomer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhangjh on 2016/10/14.
 */

@Repository
public interface MerchantStoreCustomerRepository  extends JpaRepository<MerchantStoreCustomer, Long>, JpaSpecificationExecutor {

    List<MerchantStoreCustomer> findByStoreIdAndIsDelete(Long storeId, Whether isdelete);

    List<MerchantStoreCustomer> findByVerifyPersonIdAndIsDelete(Long verifierId, Whether no);

    MerchantStoreCustomer findByVerifyPersonIdAndMerchantIdAndIsDelete(Long verifyPersonId, Long merchantId, Whether no);
}
